<template>
	<view class="selecTemplateOffice" :class="APPTheme" style="margin: 0;padding: 0;">
		<!-- <web-view src="/hybrid/html/pages/filePlay.html"></web-view> -->
	</view>
</template>

<script>
	let that
	import {
		mapGetters,
		mapActions
	} from 'vuex'
	export default {
		components:{
		},
		data() {
			return {
				base64:'',
				type:'',//文件类型
			}
		},
		computed: {
			...mapGetters(['APPTheme', 'userInfo', 'api']),
		},
		onLoad(e) {
			that = this
			console.log('接收到',decodeURIComponent(e.base64).slice(0,55));
			that.base64=decodeURIComponent(e.base64)
			that.type=e.type
			that.create()
		},
		onShow() {
		},
		//监听页面返回
		onBackPress(){
		},
		methods: {
			create(){
				let that=this
				var currentWebview = this.$scope.$getAppWebview()
				//创建Webview窗口，用于加载新的HTML页面，可通过styles设置Webview窗口的样式，创建完成后需要调用show方法才能将Webview窗口显示出来。
				let wv = plus.webview.create("/hybrid/html/pages/filePlay.html","/hybrid/html/pages/filePlay.html",{
					'uni-app': 'none', //不加载uni-app渲染层框架，避免样式冲突
					top: 0,
					height: '100%',
					background: 'transparent'
				},{
					base64:that.base64,//传参
					type:that.type//文件类型
				});
				// 在Webview窗口中添加子窗口// ${that}.bbb(objecturl)
				currentWebview.append(wv);
			},
		},
		
	};
</script>

<style scoped lang="scss">
</style>
